package cn.wolfcode.p2p.base.util;

import cn.wolfcode.p2p.base.exception.DisplayableException;

import java.math.BigDecimal;

public class AssertUtil {
    /**
     * 判断参数是否为空
     * @param param
     * @param message
     */
    public static void isNull(String param, String message){
        if (param == null || "".equals(param.trim())) {
            throw new DisplayableException(message);
        }
    }

    /**
     * 判断参数是否为空 参数类型为 BigDecimal
     * @param param
     * @param message
     */
    public static void isNull(BigDecimal param, String message){
        if (param == null) {
            throw new DisplayableException(message);
        }
    }
}
